<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
你好！

<form id="uploadForm" enctype="multipart/form-data">
    <input id="file" type="file" name="file"/>
    <button id="upload" type="button">upload</button>
</form>

</body>
<script src="js/jquery/jquery-1.7.2.js"></script>
<script >
    alert(123)
// $.getAjaxUrl("192.168.0.127",function (date) {
//     alert("sss")
//     console.log(date)
// })
$("#upload").on("click",function () {
    alert(123)
    $.ajax({
        url: "http://localhost/wachat/resource/upload/uploadAccessory",
        type: 'POST',
        cache: false,
        data: new FormData($("#uploadForm")[0]),
        processData: false,
        contentType: false,
        success: function (result) {
        },
        error: function (err) {
        }
    });
})

</script>
</html>